<?php
/**
 * Created by PhpStorm.
 * User: liuxiaojie
 * Date: 2019-03-10
 * Time: 22:51
 */

namespace app\ops\controller;

class Money extends Base

{

    function index()
    {
        $where = ['l.type'=> 3];
        $list = db('money_log l')
            ->join('customer c', 'c.id = l.u_id')
            ->where($where)
            ->field('c.nickname, l.create_time, l.reason, l.value')
            ->order('l.id desc')
            ->paginate(15);

        $this->assign('list', $list);
        return $this->fetch();
    }
}